// 在拦截器中触发依赖
const arrayProto = Array.prototype
export const arrayMethods = Object.create(arrayProto)

  ;[
    'push', 'pop', 'shift', 'unshift', 'splice', 'reserve', 'sort'
  ]

forEach(function (method) {
  // 缓存原始方法
  const original = arrayProto[method]
  Object.defineProperty(arrayMethods, method, {
    value: function mutator(...args) {
      return original.apply(this, args)
    },
    enumerable: true,
    writable: true,
    configurable: true
  })
})